import { getUserInfo } from '@/network/getData';
import { SAVE_USER_INFO } from './mutation-type';

export default {
  // 获取用户信息
  async getUserInfo({ commit }) {
    const res = await getUserInfo();
    if (res.code === 200 || res.data) {
      commit(SAVE_USER_INFO, res.data);
    }
  }
};
